package com.example.Repository;

import com.example.domain.property.Comment;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CommentRepository extends JpaRepository<Comment,Long> {

    @Query("from Comment where blog.id=?1")
    List<Comment> findAllByBlogId(Long id);

}
